//
//  requestViewController.m
//  xiaoyiNew
//
//  Created by 讯一 on 16/12/29.
//  Copyright © 2016年 讯一. All rights reserved.
//

#import "requestViewController.h"
#import "MJExtension.h"
#import "XMNetworking.h"

@interface requestViewController ()

@end

@implementation requestViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [XMCenter sendRequest:^(XMRequest * _Nonnull request) {
        request.url = @"http://120.25.210.173:8080/TextServer/GetXiaoyiXinCommditys";
        request.responseSerializerType = kXMResponseSerializerRAW;
        request.httpMethod = kXMHTTPMethodPOST;
    } onSuccess:^(id  _Nullable responseObject) {
        NSString *result = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
        NSLog(@"%@", result);
    } onFailure:^(NSError * _Nullable error) {
        NSLog(@"%@", [error localizedDescription]);
    }];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
